<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html><head>
    <title>NKDModifiedPlesseyBarcode</title>
	<meta name="generator" content="HeaderDoc">
</head><body bgcolor="#ffffff"><h1><font face="Geneva,Arial,Helvtica">NKDModifiedPlesseyBarcode</font></h1><hr><br>
<h2>Abstract</h2>
Plessey barcode object.
<h2>Discussion</h2>
This is an encoder for the Plessey Code. According to the Plessy Code 
Specification, numeric digits are assigned a set value, but the remaining values
can be used for whatever values are desired. This base object supports only the
encoding of digits. The ModifiedPlesseyHexEncoder subclass adds the ability
to encode the letters A through F for full hexadecimal support.
<br><br>
Wide bar following by narrow space is a "1" bit. 
Narrow bar followed by wide space is a "O" bit. 
<br><br>
This class uses a 3:1 wide to narrow bar ratio.
<hr><br><h2>Methods</h2>

<h3><a name="_encodeChar:">_encodeChar:</a></h3>
<b>Abstract:</b> Overridden to provide correct encoding of numeric data.

<blockquote><pre><tt>- (NSString *)<B>_encodeChar:</B>(char)<I>inChar;</I> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> String of 1s and 0s representing the encoded content
 
<hr>

<h3><a name="generateChecksum">generateChecksum</a></h3>
<b>Abstract:</b> Generates the check digit or checksum for this barcode encoding scheme.

<blockquote><pre><tt>- (void)<B>generateChecksum;</B> </tt><br>
</pre></blockquote>
<p>***TO DO: The MODIFIED Plessey check digit is calculated by using the following steps. 
<br><br>
-Starting from the units position, create a new number with all of 
the odd position digits in their original sequence. 
-Multiply this new number by 2. 
-Add all of the digits of the product from step two. 
-Add all of the digits not used in step one to the result in step three. 
-Determine the smallest number which when added to the result in step four 
will result in a multiple of 10. This is the check character. 
<br><br>
</p>
<hr>

<h3><a name="initWithContent:printsCaption">initWithContent:printsCaption</a></h3>
<b>Abstract:</b> Initializes new barcode object with provided data and specifies whether a caption should be printed
below the barcode. This overridden initialization routine sets the bar width to .1, yielding a .3 wide bar dize.

<blockquote><pre><tt>- (id)<B>initWithContent:</B>(NSString *)inContent
      <I></I> <B>printsCaption:</B>(BOOL)<I>inPrints;</I> </tt><br>
</pre></blockquote>
<p></p>
<h4>Parameters</h4>
<blockquote>
<table border="1"  width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>inContent</tt></td><td>A string containing the data to be encoded; should use only <B>ASCII-8</B> characters
(those that can be encoded using a single char in UTF-8)</td></tr>
<tr><td align="center"><tt>inPrints</tt></td><td>YES if caption should print.</td></tr>
</table>
</blockquote>
<b>Result:</b> Returns initialized NKDBarcode class
 
<hr>

<h3><a name="initiator">initiator</a></h3>
<b>Abstract:</b> Returns the encoded initiator or alignment bar(s)

<blockquote><pre><tt>- (NSString *)<B>initiator;</B> </tt><br>
</pre></blockquote>
<p>Returns encoded string representing the left most character which is Binary ONE_BIT
ONE_BIT ZERO_BIT ONE_BIT
</p>
<b>Result:</b> String of 0s and 1s representing the first (non-content) character or alignment bar(s).

<hr>

<h3><a name="terminator">terminator</a></h3>
<b>Abstract:</b> Returns the encoded terminator or alignment bar(s)

<blockquote><pre><tt>- (NSString *)<B>terminator;</B> </tt><br>
</pre></blockquote>
<p>Returns encoded string representing the right-most character.  We'll use a single thick bar so that our
code can be scanned left-to-right or right-to-left. The thick bar is followed by the  reverse-start symbol, '1100' 
backwards, or '0011'
</p>
<b>Result:</b> String of 0s and 1s representing the last (non-content) character or alignment bar(s).
    
<hr>
<p>(Last Updated 4/21/2003)
</p></body></html>
